package com.xuequ.answerme.databases;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;

/**
 * Created by shijie on 2015/10/21.
 */
public class MixDBHelper extends SQLiteOpenHelper {

    public MixDBHelper(Context context, String name, SQLiteDatabase.CursorFactory factory, int version) {
        super(context, name, factory, version);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        String sql = "create table mix_table(_id integer primary key autoincrement, questioner_objectId text not null, questioner_name text not null, question_objectId text not null, question_title text not null, question_description text, question_createdAt text not null, answer_objectId text, answer_content text)";
        db.execSQL(sql);
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }
}
